<extend name="Base/common" />
<block name="Content">
    <div class="am-cf am-padding-top">
        <div class="am-fl am-cf">
            <i class="am-icon-file"></i>
            <strong class="am-text-primary am-text-lg">站点管理</strong>
        </div>
        <hr data-am-widget="divider" class="am-divider am-divider-default" />
    </div>
   
        <div class="am-u-sm-12 am-u-md-6" style="padding:0px">
            <div class="am-btn-toolbar">
                <div class="am-btn-group am-btn-group-xs">
                    <a class="am-btn am-btn-success" href="{:U('editAction')}">
                    	<span class="am-icon-plus"></span>&nbsp;新增
                    </a>
                </div>
            </div>
        </div>
       <div class="am-fr am-padding-right am-u-md-3">
            <form class="am-form" action="{:U('index')}" method="post">
                <div class="am-input-group am-input-group-sm">
                    <input type="text" class="am-form-field am-input-sm" placeholder="站点名称" name='site_name' value="{$site_name}"/>
                    <span class="am-input-group-btn">
                        <button class="am-btn am-btn-default" type="submit">
                            搜索
                        </button>
                    </span>
                </div>
			</form>
       </div>
  
    <table class="am-table am-table-striped am-table-hover table-main">
        <thead>
            <tr>
                <th class="table-type am-text-left" style="width:15%">
                    站点名称
                </th>
                <th class="table-title am-text-left" style="width:25%">
                    详细地址
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    总收入
                </th>
                <th class="table-title am-text-left" style="width:15%">
                    总订单
                </th>
                <th class="table-set am-text-left" style="width:20%">
                    操作
                </th>
            </tr>
        </thead>
        <tbody>
            <notempty name="list">
                <foreach name="list" item="site">
                    <tr>
                        <td>
                            {$site.site_name}
                        </td>
                        <td>
                            {$site.address}
                        </td>
                        <td>
                            {$income[$site['site_id']]|default='0.00'}
                        </td>
                        <td>
                            {$total[$site['site_id']]|default='0'}
                        </td>
                        <td>
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a class="am-btn am-btn-default am-btn-xs am-text-secondary" 
                                    	href="{:U('Site/editAction?site_id='.$site['site_id'])}">
                                    	<span class="am-icon-pencil-square-o"></span>编辑
                                    </a>
                                    <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only ajax-get confirm" 
                                    	href="{:U('Site/del?siteids='.$site['site_id'])}">
                                    	<span class="am-icon-trash-o"></span>删除
                                    </a>
                                </div>
                            </div>
                        </td>
                    </tr>
                </foreach>
                <else/>
                <td colspan="4" class="text-center">
                    aOh! 暂时还没有内容!
                </td>
            </notempty>
        </tbody>
    </table>
    <!-- 分页 -->
    <ul class="am-pagination am-pagination-default am-no-layout amz-social">
        {$_page}
    </ul>
    <!-- /分页 -->
</block>
<block name="style">
    <style type="text/css">
        .am-table {
            padding-left: 0px;
            margin-left: 0px
        }
    </style>
</block>
